FIND_PATH(NASAVW_INCLUDE_DIR NAMES vw/vw.h
    HINTS
    $ENV{NASAVWDIR}
    PATH_SUFFIXES include vw
    PATHS
    /usr
    /usr/include
    /usr/include/vw
    /usr/local
    /usr/local/include
    /usr/local/include/vw
    /opt
    /opt/vw
)

SET(NASAVW_LIBRARIES)

IF(NASAVW_FIND_COMPONENTS)
    FOREACH(component ${NASAVW_FIND_COMPONENTS})
        FIND_LIBRARY(NASAVW_LIBRARY_${component} NAMES ${component}
            HINTS
            $ENV{NASAVWDIR}
            PATH_SUFFIXES lib build/lib
            PATHS
            /usr
            /usr/lib
            /usr/lib/vw
            /usr/local
            /usr/local/lib
            /usr/local/lib/vw
            /opt
            /opt/vw
        )
        LIST(APPEND NASAVW_LIBRARIES ${NASAVW_LIBRARY_${component}})
    ENDFOREACH(component)
ENDIF(NASAVW_FIND_COMPONENTS)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NASAVW DEFAULT_MSG NASAVW_LIBRARIES NASAVW_INCLUDE_DIR)

IF(NASAVW_FOUND)
    SET(NASAVW_INCLUDE_DIRS ${NASAVW_INCLUDE_DIR})
ELSE(NASAVW_FOUND)
    SET(NASAVW_INCLUDE_DIRS)
ENDIF(NASAVW_FOUND)
